home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 6: Level 6
/
17 Bit - Level 6 (1998)(Epic Marketing)[!].iso
/
quartz
/
q0498.dms
/
q0498.adf
/
PGEN3
< prev
next >
Wrap
Text File
|
1992-06-07
|
5KB
|
280 lines
curdsk=1
colour=1
yyval=12
skipdel=0
cpytitl:dc.b "Lockpick Fast Copier Request",0
cpyques:dc.b "Do you need a copy of the original?",0
copyrst:dc.b "Proceeding with Fast Copy of remaining disks...",0
frqtitl:dc.b "Move to destination path... ",0
frqpath:ds.b 256,0
frqpath2:ds.b 256,0
frqpath1:ds.b 256,0
frqpath0:ds.b 256,0
frqname:ds.b 32,0
nxtdskm:dc.b "Copy disk "
dskm1: dc.b "00 of "
dskm2: dc.b "00?",0
slash: dc.b "/",0
diskdf1:dc.b "DF",0
diskdf2:dc.b "df",0
num00: dc.b "0"
num03: dc.b "3"
cmp hdonly,0,2,goto dofreq
docopy=simplereq(cpytitl,cpyques)
cmp docopy,0,0,goto dofreq
connect=drives()
cmp connect,-1,0,goto byebye
poke(drname+2,connect+48)
poke(remdsk+19,connect+48)
poke(insdsk2+6,connect+48)
drivenum=fcopy(connect,0)
cmp drivenum,0,-1,goto byebye
goto fixdev
dofreq: freturn=freq(frqtitl,frqpath,frqname,1)
cmp freturn,0,0,goto byebye
strcpy(frqpath2,frqpath)
strcpy(frqpath0,frqpath)
fixdev: pathlen=strlen(frqpath)
cmp pathlen,0,0,goto cpynam
pathlen=pathlen+frqpath-1
terminator=^pathlen>24
cmp terminator,58,0,goto cpynam1
cmp terminator,47,0,goto cpynam1
strcat(frqpath,slash)
strcat(frqpath2,slash)
strcat(frqpath0,slash)
cpynam1:strcat(frqpath,fname)
strcat(frqpath2,fname2)
goto chkdf
cpynam: strcat(frqpath,drname)
memcpy(frqpath2,drname,4)
poke(frqpath2+4,0)
strcpy(frqpath0,frqpath2)
strcat(frqpath2,fname2)
chkdf: sc=memcmp(frqpath,diskdf1,2)
cmp sc,0,0,goto fixxx
sc=memcmp(frqpath,diskdf2,2)
cmp sc,0,2,goto start
fixxx: sc=memcmp(frqpath+2,num00,1)
cmp sc,0,-1,goto start
sc=memcmp(frqpath+2,num03,1)
cmp sc,0,1,goto start
drivenum=frqpath+2
drivenum=^drivenum>24
poke(remdsk+19,drivenum)
poke(insdsk2+6,drivenum)
drivenum=drivenum-48
cmp docopy,0,2,goto frxfix
connect=drivenum<16+drivenum
frxfix: freturn=0
fnc: dc.b "*** COULD NOT CREATE PATCHFILES! ***",0
fnf1: dc.b "File not found!",0
pnf1: dc.b "Protection not found!",0
pnf2: dc.b "*** PARAMETER FAILED! ***",0
worktxt:dc.b "Working, please stand by...",0
clickany:dc.b "Click in this window to exit...",0
prof: dc.b "*** Parameter Successful! ***",0
remdsk: dc.b "Remove disk from DF0: then click in this window...",0
insdsk: dc.b "Insert BACKUP of",0
insdsk2:dc.b " in DF0: then click in this window...",0
dc.w 0
oritab: dc.l orig1,fix1,orig2,fix2,orig3,fix3,orig4,fix4,orig5,fix5
dc.l 0,0
oritab2:dc.l origa1,fixa1,origa2,fixa2,origa3,fixa3,origa4,fixa4,origa5,fixa5
dc.l 0,0
* Open Window and print intro text...
start: cmp ^winname,"con:",0,winname=winname+18
pokel(wtitle,winname)
gosub openwin
cmp docopy,1,0,goto main
cmp freturn,-1,0,goto main
gosub remm
txtptr=insdsk
gosub print3d
txtptr=dname
colour=3
gosub print3d
txtptr=insdsk2
colour=1
gosub print3d
gosub waitsgn
cmp class,$200000,2,goto chkclow
cmp code,$1b,0,goto remprta
chkclow:cmp class,$200,0,goto remprta
skipdel=1
main: txtptr=worktxt
gosub print3d
cmp skipdel,0,2,goto begit
cmp freturn,-1,0,goto begit
delay(100)
begit: strcpy(frqpath1,frqpath0)
strcat(frqpath1,create)
hand1=open(frqpath1,1006)
cmp hand1,0,0,goto errcant
write(hand1,cresta,creend-cresta)
close(hand1)
strcpy(frqpath1,frqpath0)
strcat(frqpath1,create2)
hand1=open(frqpath1,1006)
cmp hand1,0,0,goto errcant
write(hand1,cresta2,creend2-cresta2)
close(hand1)
pos=0
pointer=oritab
looper: orig=^pointer
pointer=pointer+4
fix=^pointer
pointer=pointer+4
pval=^pointer
cmp pval,0,0,top=garbage
cmp pval,0,2,top=pval
* Scan file for our string and replace if found...
pos=fscan(frqpath,orig,fix-orig,fix,top-fix,pos)
cmp pos,-1,0,goto errpnf
cmp pos,-2,0,goto errfnf
cmp pval,0,2,goto looper
begit2: pos=0
pointer=oritab2
looper2:orig=^pointer
pointer=pointer+4
fix=^pointer
pointer=pointer+4
pval=^pointer
cmp pval,0,0,top=garbage2
cmp pval,0,2,top=pval
pos=fscan(frqpath2,orig,fix-orig,fix,top-fix,pos)
cmp pos,-1,0,goto errpnf
cmp pos,-2,0,goto errfnf
cmp pval,0,2,goto looper2
itsok: txtptr=prof
gosub print3d
delay(100)
cmp note1,0,0,goto ky1
colour=3
txtptr=note1
gosub print3d
cmp note2,0,0,goto ky1
txtptr=note2
gosub print3d
cmp note3,0,0,goto ky1
txtptr=note3
gosub print3d
ky1: cmp freturn,0,0,goto ky1a
ky1x: txtptr=clickany
gosub print3d
goto keyout
ky1a: colour=1
yyval=yyval+10
txtptr=remdsk
gosub print3d
ky2: gosub remm
gosub waitsgn
cmp mess,0,0,goto ky2
cmp numdsk,2,-1,goto bye0
yyval=yyval+10
txtptr=copyrst
gosub print3d
delay(50)
ky3: curdsk=curdsk+1
cmp curdsk,numdsk,1,goto bye0
tensv=curdsk/10&$ffff
onesv=tensv*10
onesv=curdsk-onesv
poke(dskm1,tensv+48)
poke(dskm1+1,onesv+48)
tensv=numdsk/10&$ffff
onesv=tensv*10
onesv=numdsk-onesv
poke(dskm2,tensv+48)
poke(dskm2+1,onesv+48)
docopy=simplereq(cpytitl,nxtdskm)
cmp docopy,1,-1,goto bye0
drivenum=fcopy(connect,-1)
cmp drivenum,0,-1,goto bye0
goto ky3
keyout: gosub remm
gosub waitsgn
cmp mess,0,0,goto keyout
bye0: gosub closwin
byebye: end
errpnf: cmp freturn,0,0,goto failx
txtptr=pnf1
gosub print3d
goto prii5a
errcant:txtptr=fnc
gosub print3d
goto prii5a
remprt: delay(150)
cmp freturn,-1,0,goto bye0
remprta:yyval=yyval+10
txtptr=remdsk
gosub print3d
goto keyout
errfnf: txtptr=fnf1
gosub print3d
goto prii5a
prii5a: txtptr=pnf2
gosub print3d
goto remprt
failx: txtptr=pnf1
gosub print3d
txtptr=pnf2
gosub print3d
goto ky1x
#i "Params:WINHAND"